package com.example.seh.chat;

import android.graphics.Bitmap;

public class Msg {
    public static final int TYPE_RECEIVED = 0;
    public static final int TYPE_SEND = 1;
    public static final int MSG = 0;
    public static final int IMG = 1;
    private int fromId;
    private int toId;
    private String message;
    private String img;
//    private int receivedOrSendType;
    private int msgOrImgType;
    private String sendTime;

//    public Msg(String content, Bitmap bitmap, int receivedOrSendType, int msgOrImgType){
//        this.Bitmap = bitmap;
//        this.content = content;
////        this.receivedOrSendType = receivedOrSendType;
//        this.msgOrImgType = msgOrImgType;
//    }

    public Msg(int fromId, int toId, String content, String bitmap, int msgOrImgType) {
        this.fromId = fromId;
        this.toId = toId;
        this.message = content;
        img = bitmap;
        this.msgOrImgType = msgOrImgType;
    }

    public static int getTypeReceived() {
        return TYPE_RECEIVED;
    }

    public static int getTypeSend() {
        return TYPE_SEND;
    }

    public static int getMSG() {
        return MSG;
    }

    public static int getIMG() {
        return IMG;
    }

    public void setContent(String content) {
        this.message = content;
    }

    public void setBitmap(String bitmap) {
        img = bitmap;
    }

    public void setMsgOrImgType(int msgOrImgType) {
        this.msgOrImgType = msgOrImgType;
    }

    public String getSendTime() {
        return sendTime;
    }

    public void setSendTime(String sendTime) {
        this.sendTime = sendTime;
    }

    public int getFromId() {
        return fromId;
    }

    public void setFromId(int fromId) {
        this.fromId = fromId;
    }

    public int getToId() {
        return toId;
    }

    public void setToId(int toId) {
        this.toId = toId;
    }

    public String getContent() {
        return message;
    }

    public String getBitmap() {
        return img;
    }

//    public int getReceivedOrSendType() {
//        return receivedOrSendType;
//    }

    public int getMsgOrImgType() {

        return msgOrImgType;
    }

    @Override
    public String toString() {
        return "Msg{" +
                "fromId=" + fromId +
                ", toId=" + toId +
                ", content='" + message + '\'' +
                ", Bitmap=" + img +
                ", msgOrImgType=" + msgOrImgType +
                ", sendTime='" + sendTime + '\'' +
                '}';
    }
}
